home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / M-More Monthly Disks / (c)m7.d64 / riki tiki.c (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  5KB  |  119 lines

  1. 0 REM*RIKI TIKI 64, BASED ON THE VIC 20 PROGRAM BY ROGER D BURGE
  2. 1 REM*CONVERTED TO THE COMMODORE 64 BY  ROGER D BURGE, #2667
  3. 2 REM*TORONTO PET USERS GROUP, TORONTO, CANADA, (C)1984 TPUG INC
  4. 20 POKE53280,.:POKE53281,15:PRINT"[144][147][142]              RIKI TIKI 64              "
  5. 22 PRINT"[151]COMING UP.  PLEASE WAIT!"
  6. 25 POKE51,.:POKE52,48:POKE55,.:POKE56,48:CLR:GOSUB8600
  7. 30 POKE1022,.:POKE1023,.:X=RND(-TI):DIMC(84):C(4)=1:C(0)=2:C(80)=3:C(84)=4
  8. 31 C(39)=5:C(43)=6:C(41)=7:C(45)=8:POKE781,40
  9. 40 GOTO8500
  10. 90 FORT=1TOT0:NEXT
  11. 91 FORT=1TOT0:NEXT
  12. 100 SYSJS:B=F1-PEEK(ZP):POKEA,BS:GOSUB1000:A=A+B:POKEA,C(B+F2+P):P=-P
  13. 104 GOSUB3000:IFMETHENGOSUB4000
  14. 400 ONSUGOTO100,91,90
  15. 800 POKE53265,PEEK(53265)AND239:SM=1024:CC=54272:JS=820:SC=.:ME=.
  16. 801 POKE53281,1:PRINT"[147]":POKE53281,.:ZP=251
  17. 802 FT=50:F1=41:BS=32:F2=40:W=1:C1=13:TW=2:F2=42:TR=3:NI=9:F3=43:C3=12:FR=4:F4=44
  18. 803 C4=7:SS=1185:SR=799:T9=29:T0=30:NT=19:VT=14:DE=20:F0=40:VV=15:TE=10:SX=60
  19. 805 P=2:PL=SM+97:RC=70:SU=3:HI=PEEK(1022)+256*PEEK(1023):SJ=889:G=.
  20. 806 H$="HI:[146]":S$=""
  21. 807 POKE53272,(PEEK(53272)AND240)+12
  22. 810 PRINT"[158] BY ROGER D BURGE 
  23. 815 [129]T[178]SM[170]120[164]SM[170]159:[151]T,43:[151]T[170]CC,12
  24. 820 [151]T[170]800,43:[151]T[170]800[170]CC,12:[130]:[129]T[178]SM[170]160[164]SM[170]920[169]40
  25. 821 [151]T,43:[151] T[170]CC,12:[151]T[170]39,43:[151]T[170]39[170]CC,12:[130]
  26. 822 [153]"PRINT              RIKI TIKI 64              SCORE:WAIT 0
  27. 825 PRINTH$;HI:A=SM+500
  28. 830 PRINT""SPC(18)"[158]EAG":POKE53265,PEEK(53265)OR16:GOTO90
  29. 1000 PF=PEEK(B+A):PF=ABS(PF-F0):ONPFGOTO1010,1020,1030,1040
  30. 1002 RETURN
  31. 1010 SYSSJ:SC=SC+W:GOSUB2000:POKEB+A+CC,W:RETURN
  32. 1020 SYSSJ:SC=SC+TW:GOSUB2000:POKEB+A+CC,W:RETURN
  33. 1030 POKEA,T9:PL=PL+W:GOTO2100
  34. 1040 X=INT(RND(W)*TR)+W:IFX=TWTHEN1050
  35. 1041 U=INT(RND(W)*NI)+W
  36. 1042 FORT=WTOU:POKES2,33:POKESV+8,28+T:POKEA+B,T+48:FORR=WTO90:NEXTR,T
  37. 1043 POKES2,.:POKESV+8,28:SC=SC+U:GOSUB2000:POKEA+B+CC,W:RETURN
  38. 1050 POKEA,T9:SC=SC-TE:GOSUB5000:PRINTS$;"    ":GOSUB2000:POKEA,BS:POKEA+B+CC,1:RETURN
  39. 2000 IFSC<.THENSC=.:PL=PL+W:POKEPL,BS:PRINTS$;SC:GOSUB8000:IFPL=SM+100THENG=1:GOSUB2100
  40. 2002 PRINT"";SC
  41. 2031 IFSC>NTTHENRC=T0:SU=W:RETURN
  42. 2032 IFSC>VTANDSC<DETHENRC=F0:SU=W:RETURN
  43. 2033 IFSC>NIANDSC<VVTHENRC=FT:SU=W:RETURN
  44. 2034 IFSC>FRANDSC<TETHENRC=SX:SU=TW:RETURN
  45. 2035 IFSC<C1THENSU=TR:RETURN
  46. 2100 POKEPL,BS:POKEA,T9:IFG=.THENGOSUB7000:IFPL<SM+100THENPOKEA,BS:A=SM+500:RETURN
  47. 2110 IFSC>HITHENHI=SC:POKE1023,INT(HI/256):POKE1022,HI-PEEK(1023)*256:PRINT"[158]"H$HI
  48. 2159 PRINT"[158][129]GAME OVER!"
  49. 2160 PRINT"[158][152]PRESS FIRE BUTTON TO REPLAY / F1 TO QUIT":GOTO8597
  50. 3000 ME=INT(RND(W)*RC)+W:IFME=WTHENME=F1:MC=C1:RETURN
  51. 3020 IFME=TWTHENME=F2:MC=TR:RETURN
  52. 3030 IFME=TRORME=NITHENME=F3:MC=C3:RETURN
  53. 3040 IFME=FRTHENME=F4:MC=C4:RETURN
  54. 3060 ME=.:RETURN
  55. 4000 PO=SS+INT(RND(W)*SR):IFPEEK(PO)=F3ORPO=ATHENRETURN
  56. 4001 POKEPO,ME:POKEPO+CC,MC:RETURN
  57. 5000 POKES1,33:FORT=1TO450:NEXT:POKES1,.:RETURN
  58. 7000 POKESV+W,8:POKES2,129:POKES1,33:POKESV+8,2 :FORT=1TO1000:NEXT
  59. 7001 POKES1,.:POKES2,.:POKESV+W,11:POKESV+8,28
  60. 7002 RETURN
  61. 8000 POKES1,17:FORT=1TO9:FORL=250TO200STEP-2:POKESV+W,L:NEXTL,T
  62. 8001 POKES1,.:POKESV+W,11:RETURN
  63. 8500 PRINT"[147]              RIKI TIKI 64              "
  64. 8501 PRINT"[145]            BY ROGER D BURGE"
  65. 8510 PRINT"DEADLY EXPERIMENTAL MUTANT SNAKES HAVE ESCAPED THEIR CAGES!.
  66. 8515 [153]" ONLY RIKI TIKI CAN STOP THEM AND ITS UPTO YOU TO HELP RIKI.
  67. 8516 PRINT" USE JOYSTICK #1 TO GUIDE RIKI THROUGH  THE PIT WHERE THE SNAKES ";
  68. 8517 PRINT"HAVE BEEN      CORNERED. ";
  69. 8519 PRINT"SIMPLY LEAD RIKI TO A SNAKE & HE WILL AUTOMATICALLY USE HIS STUN ";
  70. 8520 PRINT"ROD  TO CAPTURE THE SNAKE.
  71. 8522 [153]" THE PIT IS SURROUNDED BY AN ELECTRIC   FENCE & THE CRAZY GUARDS THAT";
  72. 8524 [153]" LET THE   SNAKES ESCAPE ARE THROWING MORE SECTIONSOF FENCE INTO THE ";
  73. 8526 [153]"PIT ALL THE TIME. THE YELLOW SNAKES ARE VERY DANGEROUS & MIGHTBITE RIKI.
  74. 8528 PRINT"SCORING:GREEN SNAKE=1":PRINTSPC(8)"LIGHT BLUE SNAKE=2"
  75. 8529 PRINTSPC(8)"YELLOW SNAKE=1 TO 9
  76. 8530 [153][166]8)"YELLOW SNAKE BITE=LOSE 10
  77. 8532 PRINT" IF SCORE GOES BELOW 0 THEN YOU LOSE 1  MAN & SCORE RESETS TO 0. ";
  78. 8534 PRINT"TOUCH THE FENCE& YOU LOSE A MAN. LOSE 3 & GAME'S OVER.
  79. 8536 [153]"STOPPRESS FIRE BUTTON TO PLAY. F1 TO QUIT."
  80. 8597 [139][194](197)[178]60[167]800
  81. 8598 [139][194](197)[178]4[167]10000
  82. 8599 [137]8597
  83. 8600 [151]56334,[194](56334)[175]254:[151]1,[194](1)[175]251
  84. 8605 [129]I[178]12288[164]12288[170]256[172]8:[151]I,[194](I[170]40960):[130]
  85. 8606 [151]1,[194](1)[176]4:[151]56334,[194](56334)[176]1
  86. 8607 [135]A:[139]A[178][171]1[167]9000
  87. 8608 [129]T[178].[164]7:[135]B:[151]12288[170]A[172]8[170]T,B:[130]:[137]8607
  88. 8610 [131]1,60,216,219,254,216,216,54,195
  89. 8620 [131]2,60,24,216,254,219,216,214,51
  90. 8630 [131]3,60,27,219,127,27,27,108,199
  91. 8640 [131]4,60,24,27,127,219,27,107,204
  92. 8650 [131]5,56,216,216,254,219,216,54,195
  93. 8660 [131]6,56,24,216,254,219,216,246,51
  94. 8670 [131]7,28,27,27,127,219,27,108,195
  95. 8680 [131]8,28,24,27,127,219,27,107,204
  96. 8690 [131]29,24,24,126,24,24,24,24,24
  97. 8700 [131]41,112,216,204,12,12,24,51,124
  98. 8710 [131]42,127,107,60,24,24,60,126,255
  99. 8720 [131]43,102,102,255,102,102,255,102,102
  100. 8730 [131]44,24,102,63,6,12,216,216,48,-1
  101. 9000 [129]T[178]820[164]887:[135]A:[151]T,A:[130]
  102. 9040 [129]T[178]889[164]916:[135]A:[151]T,A:[130]
  103. 9050 SV[178]54272:[129]T[178]SV[164]SV[170]24:[151]T,.:[130]
  104. 9060 [151]SV[170]24,15:[151]SV[170]5,17:[151]SV[170]6,17
  105. 9070 [151]SV[170]1,11:[151]SV,.
  106. 9075 [151]SV[170]12,17:[151]SV[170]13,17:[151]SV[170]8,28:[151]SV[170]7,.
  107. 9080 S1[178]54276:S2[178]SV[170]11:[142]
  108. 9500 [131]173,1,220,41,15
  109. 9510 [131]201,7,208,5,162,40,76,90,3
  110. 9520 [131]201,13,208,5,162,1,76,90,3
  111. 9530 [131]201,11,208,5,162,42,76,90,3
  112. 9540 [131]201,14,208,2,162,81
  113. 9550 [131]134,251
  114. 9560 [131]160,.,169,17,141,4,212,162,255,24,202,224,.,208,251,200,192
  115. 9570 [131]2,208,239,169,16,141,4,212,166,251,96
  116. 9580 [131]160,.,169,33,141,4,212,162,255,24,202,224,.,208,251,200,192
  117. 9590 [131]2,208,239,169,32,141,4,212,166,251,96
  118. 10000 [153]"    STOPLOAD":[128]
  119.